/**
 * 
 */
package com.xbang.attendance.web.action.system.test;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.demo2do.lighturl.annotation.Action;
import com.xbang.attendance.entity.rec.oriRecord;
import com.xbang.attendance.service.SystemService;
import com.xbang.core.page.Page;
import com.xbang.core.page.Result;
import com.xbang.core.struts.support.SearchActionSupport;

/**
 * @author dev.zhang
 * 
 */
public class Index extends SearchActionSupport {

	private static final long serialVersionUID = -6357862276225285804L;

	@Autowired
	private SystemService systemService;
	
	private List<oriRecord> oriRecords = new ArrayList<oriRecord>();
	
	@Action("/system/test/list")
	public String execute() throws Exception {

		//
		Result result = systemService.listByPage(oriRecord.class, new Page());
		
		oriRecords = result.getItems();
		page = result.getPage();
		
		//oriRecord.userId = 1;
		//eq.oriRecord.userId
		
		return "index";
	}

	/**
	 * @return the oriRecords
	 */
	public List<oriRecord> getOriRecords() {
		return oriRecords;
	}

	/**
	 * @param oriRecords the oriRecords to set
	 */
	public void setOriRecords(List<oriRecord> oriRecords) {
		this.oriRecords = oriRecords;
	}

	/**
	 * @param systemService the systemService to set
	 */
	public void setSystemService(SystemService systemService) {
		this.systemService = systemService;
	}

	@Override
	public void resetCustomerSearchCriteria() {
		
	}	
	
	
}
